package com.wavehi.data_access.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author WaveHi
 * @Date 17/11/2021 下午 9:46
 * @Version 1.0
 * @Contact HJBWaveHi@163.com
 * @Description
 */
@Controller
public class MyController {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    @RequestMapping("/query")
    @ResponseBody
    public Long query() {
        return jdbcTemplate.queryForObject("select count(*) from t_first_table", Long.class);
    }
}
